﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class student_webcon_paper : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }

    public int Guid
    {
        set
        {
            this.hlPaper.Attributes.Add("guid", value.ToString());
            PaperFile pf = new PaperFile(value);
            this.labDate.Text = pf.CreateTime.ToString();
            this.labIntro.Text = pf.Intro;
            this.labKeywords.Text = pf.Keywords;
            this.hlPaper.Text = pf.Title;
            this.labFlag.Text = Paper.Tip(pf.PaperFlag);
            string fn = this.hlPaper.Text + System.IO.Path.GetExtension(pf.FileName);
            this.hlPaper.NavigateUrl = Params.RootHttp + "download.aspx/" + fn + "?fp=" + Server.UrlPathEncode(Params.FilesFolderPath + pf.FileName) + "&fn=" + Server.UrlEncode(fn);
        }
        get
        {
            return Convert.ToInt32(this.hlPaper.Attributes["guid"]);
        }
    }
}
